<template>
  <div>
    <div class="player">
      <div class="playerMain">
        <img src="@/assets/img/pcImg/women.png" alt="" class="women" />
        <img src="@/assets/img/pcImg/mouse.png" alt="" class="mouse" />
        <div class="left">
          <p>LIVE CASINO</p>
          <img src="@/assets/img/pcImg/play.png" alt="" @click="start('123')" />
        </div>
        <div class="right">
          <p>ONLINE GAME</p>
          <img src="@/assets/img/pcImg/play.png" alt="" @click="start('121')" />
        </div>
      </div>
      <div class="footer">
        <div class="footerMain">
          <h3>
            <a href="">{{ $t("AboutUs") }} | </a>
            <a href="">{{ $t("DepositHelp") }} | </a>
            <a href="">{{ $t("WithdrawalHelp") }} | </a>
            <a href="">{{ $t("FAQAnnouncement") }}</a>
          </h3>
          <div class="fengefu">
            <img src="@/assets/img/pcImg/fenggefu.png" alt="" />
          </div>
          <p>
            {{ $t("homeTip") }}
          </p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { httpEnterGame } from "@/http/api";
export default {
  name: "Footer",
  methods: {
    async start(id) {
      // if (!localStorage.getItem("TOKEN")) return this.$router.push("/Register");
      if (!localStorage.getItem("TOKEN")) {
        this.$emit("toRegister");
        return;
      }
      if (this.startAjax) return;
      let params = {
        id,
      };
      this.startAjax = true;
      let res = await httpEnterGame(params);
      if (res.code == 0) {
        // setAllScreen(true, document);
        window.location.href = res.data.parameter.url;
        // this.iframeUrl = res.data || '';
      } else {
        this.$message.error(res.message);
      }
      this.startAjax = false;
    },
  },
};
</script>
<style lang="less" scoped>
.player {
  background: #472d18;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  .playerMain {
    width: 1200px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    .women {
      position: absolute;
      left: 0;
      bottom: -16px;
      z-index: 1;
      // height: 210px;
      width: 220px;
      object-position: center;
    }
    .mouse {
      position: absolute;
      right: 0;
      bottom: -14px;
      z-index: 1;
      // height: 170px;
      width: 170px;
      object-position: center;
    }
    .left {
      position: absolute;
      left: 20%;
      top: 12%;
      z-index: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      p {
        color: #fff;
        font-size: 1.4rem;
        margin-bottom: 6px;
      }
      img {
        width: 100px;
        cursor: pointer;
      }
    }
    .right {
      position: absolute;
      right: 16%;
      top: 12%;
      z-index: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      p {
        color: #fff;
        font-size: 1.4rem;
        margin-bottom: 6px;
      }
      img {
        width: 100px;
        cursor: pointer;
      }
    }
  }
  .footer {
    width: 100%;
    padding: 16px 0 20px 0;
    background: #444745;
    display: flex;
    justify-content: center;
    align-items: center;
    .footerMain {
      width: 1200px;
      h3 {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 8px;
        color: #fff;
        margin-right: 2px;
        a {
          color: #fff;
          font-size: 1.1rem;
          margin-right: 2px;
        }
      }
      .fengefu {
        width: 100%;
        height: 2px;
        img {
          width: 100%;
          height: 2px;
        }
        margin-bottom: 10px;
      }
      p {
        width: 90%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #fff;
        margin: auto;
        font-size: 14px;
      }
    }
  }
}
</style>
